/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: avaj llik
 * License Type: Purchased
 */
package orm;

import org.orm.*;
import java.io.Serializable;
import javax.persistence.*;
/**
 * Entidad que contiene los registro de las personas.
 */
@Entity
@org.hibernate.annotations.Proxy(lazy=false)
@Table(name="tcp_persona")
@Inheritance(strategy=InheritanceType.SINGLE_TABLE)
public class Tcp_persona implements Serializable {
	public Tcp_persona() {
	}
	
	private java.util.Set this_getSet (int key) {
		if (key == orm.ORMConstants.KEY_TCP_PERSONA_TCP_PUBLICACION) {
			return ORM_tcp_publicacion;
		}
		
		return null;
	}
	
	@Transient	
	org.orm.util.ORMAdapter _ormAdapter = new org.orm.util.AbstractORMAdapter() {
		public java.util.Set getSet(int key) {
			return this_getSet(key);
		}
		
	};
	
	@Column(name="pers_id", nullable=false)	
	@Id	
	@GeneratedValue(generator="VAC16051212C8A5FB0B4018C0")	
	@org.hibernate.annotations.GenericGenerator(name="VAC16051212C8A5FB0B4018C0", strategy="increment")	
	private int pers_id;
	
	@Column(name="pers_rut", nullable=true, length=10)	
	private String pers_rut;
	
	@Column(name="pers_dverificador", nullable=true, length=1)	
	private Character pers_dverificador;
	
	@Column(name="pers_nombre", nullable=true, length=255)	
	private String pers_nombre;
	
	@Column(name="sexo", nullable=false, length=10)	
	private String sexo;
	
	@OneToMany(mappedBy="pub_id_persona", targetEntity=orm.Tcp_publicacion.class)	
	@org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE, org.hibernate.annotations.CascadeType.LOCK})	
	@org.hibernate.annotations.LazyCollection(org.hibernate.annotations.LazyCollectionOption.TRUE)	
	private java.util.Set ORM_tcp_publicacion = new java.util.HashSet();
	
	private void setPers_id(int value) {
		this.pers_id = value;
	}
	
	public int getPers_id() {
		return pers_id;
	}
	
	public int getORMID() {
		return getPers_id();
	}
	
	/**
	 * Cuerpo del Run sin dígito verificador.
	 */
	public void setPers_rut(String value) {
		this.pers_rut = value;
	}
	
	/**
	 * Cuerpo del Run sin dígito verificador.
	 */
	public String getPers_rut() {
		return pers_rut;
	}
	
	/**
	 * Dígito Verificador
	 */
	public void setPers_dverificador(char value) {
		setPers_dverificador(new Character(value));
	}
	
	/**
	 * Dígito Verificador
	 */
	public void setPers_dverificador(Character value) {
		this.pers_dverificador = value;
	}
	
	/**
	 * Dígito Verificador
	 */
	public Character getPers_dverificador() {
		return pers_dverificador;
	}
	
	/**
	 * Nombre de la persona.
	 */
	public void setPers_nombre(String value) {
		this.pers_nombre = value;
	}
	
	/**
	 * Nombre de la persona.
	 */
	public String getPers_nombre() {
		return pers_nombre;
	}
	
	public void setSexo(String value) {
		this.sexo = value;
	}
	
	public String getSexo() {
		return sexo;
	}
	
	private void setORM_Tcp_publicacion(java.util.Set value) {
		this.ORM_tcp_publicacion = value;
	}
	
	private java.util.Set getORM_Tcp_publicacion() {
		return ORM_tcp_publicacion;
	}
	
	@Transient	
	public final orm.Tcp_publicacionSetCollection tcp_publicacion = new orm.Tcp_publicacionSetCollection(this, _ormAdapter, orm.ORMConstants.KEY_TCP_PERSONA_TCP_PUBLICACION, orm.ORMConstants.KEY_TCP_PUBLICACION_PUB_ID_PERSONA, orm.ORMConstants.KEY_MUL_ONE_TO_MANY);
	
	public String toString() {
		return String.valueOf(getPers_id());
	}
	
}
